{% extends "base.html" %}
{% block mycontent %}
    <div class="container">
        <h4>{{ fb.title }}</h4>
        <hr>
    </div>

    <div class="container" style="padding-bottom: 30px">
        {% if fb.status == 0 %}
            <form action="/start_process_item/{{ fb.id }}" method="post">
        {% elif fb.status == 1 %}
            <form action="/end_process_item/{{ fb.id }}" method="post">
        {% else %}
            <form action="/feedback_list" method="post">
        {% endif %}
        <div class="form-group">
            <label for="id">ID：</label>
            <input type="text" class="form-control" name="id" value="{{ fb.id }}" readonly>
        </div>
        <div class="form-group">
            <label for="name">姓名：</label>
            <input type="text" class="form-control" name="name" value="{{ fb.name }}" readonly>
        </div>
        <div class="form-group">
            <label for="phone">手机：</label>
            <input type="text" class="form-control" name="phone" value="{{ fb.phone }}" readonly>
        </div>
        <div class="form-group">
            <label for="address">地址：</label>
            <input type="text" class="form-control" name="address" value="{{ fb.address }}" readonly>
        </div>
        <div class="form-group">
            <label for="booktime">预约时间：</label>
            <input type="text" class="form-control" name="booktime" value="{{ fb.booktime }}" readonly>
        </div>
        <div class="form-group">
            <label for="serviceType">服务类型：{{ fb.serviceType }}</label>
        </div>
        <div class="form-group">
            <label for="title">简要说明：</label>
            <input type="text" class="form-control" name="title" value="{{ fb.title }}" readonly>
        </div>
        <div class="form-group">
            <label for="content">具体描述：</label>
            <textarea class="form-control" rows="3" name="content" readonly>{{ fb.content }}</textarea>
        </div>
        <div class="form-group">
            <label for="content">状态：
                {% if fb.status == 0 %}
                    未处理
                {% elif fb.status == 1 %}
                    处理中
                {% elif fb.status ==2 %}
                    处理完毕
                {% endif %}
            </label>
        </div>
        <div class="form-group">
            <label for="content">负责人：
                {% if fb.operator == None %}
                    未指定
                {% else %}
                    {{ fb.operator }}
                {% endif %}
            </label>
        </div>

        {% if fb.status == 0 %}
            <button type="submit" class="btn btn-warning" style="width:100%">
                开始处理
            </button>
        {% elif fb.status == 1 %}
            <button type="submit" class="btn btn-success" style="width:100%">
                处理结束
            </button>
        {% elif fb.status ==2 %}
            <a href="/feedback_list" class="btn btn-primary" style="width:100%">
                返回列表
            </a>
        {% endif %}

        </form>
    </div>
{% endblock %}